UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'hUH2NN8nfBVlOrSpDtfdnV+RlPZEiSaQVyoQ7VLk3FA='
WHERE
key_id = '761f04f3ffde3d183d9bdb37e1c1fa209d916a771700c8b49624bf1209fcd360'
AND (
token = 'hUH2NN8nfBVlOrSpDtfdnV+RlPZEiSaQVyoQ7VLk3FA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)