UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '27ZqFxXILdMinjGsZUTBgwR1dj2rOT2LWNcLjVJBhNA='
WHERE
key_id = '0d3d88093d48ad3083ba5aded368daad3dfe4fa71ca5360512e6dfa90632fa26'
AND (
token = '27ZqFxXILdMinjGsZUTBgwR1dj2rOT2LWNcLjVJBhNA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)