UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'B1T/TWejORcQB5zDCG05P9Ee/pKPLQj4+cWQT8sTsm0='
WHERE
key_id = 'e0b4dced78fbe6e500f78845f67a769f3596725ded094c91abd35cd4a6878d2e'
AND (
token = 'B1T/TWejORcQB5zDCG05P9Ee/pKPLQj4+cWQT8sTsm0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)