UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'kwHdJG5UBV7hKJE6DDXS/OHeJ+E39ZDG92ISSixR5lI='
WHERE
key_id = '96c75a7fd19db8a6eea9670898537726d12cb54512004993abebba578d00559e'
AND (
token = 'kwHdJG5UBV7hKJE6DDXS/OHeJ+E39ZDG92ISSixR5lI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)