UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '283Yx7oR2HcYwrQmG/Iw3E8N6AfweesHqR8lu0uMLZE='
WHERE
key_id = '49cc1d56568f498980bf5b091c80103ccf02d148c299fd1543ad1326dd986669'
AND (
token = '283Yx7oR2HcYwrQmG/Iw3E8N6AfweesHqR8lu0uMLZE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)