UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Rlj8w/+vrPMqmyrhoKbCWLZoRCNF6/pjR5TviaXm3ow='
WHERE
key_id = '94cb80210a44c09b58c586bec624a3042c8ad76b9198c1f775730b095f5220d9'
AND (
token = 'Rlj8w/+vrPMqmyrhoKbCWLZoRCNF6/pjR5TviaXm3ow='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)