UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1jcpPUpqpfOlv4Ft9AxsOo+ppxDrTq0s3TbYIU3phjw='
WHERE
key_id = '3063b25a788299f83caa55fd98dabe55a8e6af9cbb8ae85da9447b5bb04bae20'
AND (
token = '1jcpPUpqpfOlv4Ft9AxsOo+ppxDrTq0s3TbYIU3phjw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)