UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'YskYA/dxcXDnT1+TJ2dD2a08TcIqTztwQjWMyjgjWo0='
WHERE
key_id = '0e230bf75eb6965c24d9879926c917a3fa09dc0fa065d8ac62d15cf463426723'
AND (
token = 'YskYA/dxcXDnT1+TJ2dD2a08TcIqTztwQjWMyjgjWo0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)