UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ZIHEEM3ZJuELUqq4AyWiUgpwYTCDtsJi2LwZlyELmvQ='
WHERE
key_id = '5f62bb993588aadd13c9da1267bf8808db5d6b57542d36c00792005e84a56587'
AND (
token = 'ZIHEEM3ZJuELUqq4AyWiUgpwYTCDtsJi2LwZlyELmvQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)