UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '8e8ND2+i/4TBquOr3hdOfjBsvKzqyX1Rp0Ty9TDNJs0='
WHERE
key_id = '4cc3ca5a75fde610988ede1acd4e500fe0ee71a5596e8a3664bdc2a5933ffc86'
AND (
token = '8e8ND2+i/4TBquOr3hdOfjBsvKzqyX1Rp0Ty9TDNJs0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)