UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '3eTXfWyMGeqoCT46nRL+pcQoGq5qRgro5BoM8XEVgds='
WHERE
key_id = '467300ddd24f0997dd4d8fb2ef3ea022171439c4124443eaad3de6944c9b3ef8'
AND (
token = '3eTXfWyMGeqoCT46nRL+pcQoGq5qRgro5BoM8XEVgds='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)