UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'jVsnpUmjjizqZ5zbIlDK8RgpkwQwQYUt6BUCAOGqM+s='
WHERE
key_id = 'a63d61c03eb06ff3f8800df410002ae05b3048bcb8a6d6cddb3ed3285aec2412'
AND (
token = 'jVsnpUmjjizqZ5zbIlDK8RgpkwQwQYUt6BUCAOGqM+s='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)