UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/S++s6clFeYdns0oJME1lxBP5pGvPEipN89CaQE/53k='
WHERE
key_id = 'ef9353c1810d0cbe54fee113e03985800387e8270601fee8696bcc3209b158a8'
AND (
token = '/S++s6clFeYdns0oJME1lxBP5pGvPEipN89CaQE/53k='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)