UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'SMkhECR9qF4T0ck5Pz6XuDSGfnaSqpBQR/u5iwOlGek='
WHERE
key_id = '086a02799ed705f9918ca110118eafb54cc389f5fb6ae1562e69b1b53455b233'
AND (
token = 'SMkhECR9qF4T0ck5Pz6XuDSGfnaSqpBQR/u5iwOlGek='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)