UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'eZNPTl/7nfOvn89ZwhIf1Kx/45GbJn2219VL+P7q+oQ='
WHERE
key_id = '02cabb12df6e0104fec5c138c033838d7ded0d31ad8eacadd16cf1bc59380fd1'
AND (
token = 'eZNPTl/7nfOvn89ZwhIf1Kx/45GbJn2219VL+P7q+oQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)