UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '7eIE+Zh3j1jumG775HRYCmrbomRKsc/KcWXuNwVqbSw='
WHERE
key_id = '5450074e7159cf485ec5c0c8b4b1b78803489d0111dcf82f14e05c11e6b36f2c'
AND (
token = '7eIE+Zh3j1jumG775HRYCmrbomRKsc/KcWXuNwVqbSw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)