UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+rqXPshbRtenFVDQybpQjw/dl1qiV1lpyg3jy76KeMg='
WHERE
key_id = '08dd150179fc3558bcfd8ec9dc4ebb7a31f0c5a145324b10054f33bcfe0a3776'
AND (
token = '+rqXPshbRtenFVDQybpQjw/dl1qiV1lpyg3jy76KeMg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)