UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+l0FW/q+Lq7p+Z5V+3gTzLyTTiWMpaRBPsWa5ugaCwI='
WHERE
key_id = '198e2eba892277dcbe9a016c4c6af20f1380258846f0c02a7a2dda31c65ba34e'
AND (
token = '+l0FW/q+Lq7p+Z5V+3gTzLyTTiWMpaRBPsWa5ugaCwI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)